/*
ID:luongho3
LANG:C++
TASK:humble
*/
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("humble.in");
ofstream fout("humble.out");
#define MAXN 100001
#define MAXK 101
int n,k;
int prime[MAXK],humble[MAXN],primeidx[MAXK];
int main() {
    fin >> k >> n;
    int i,j,best,l,best_idx;
    for (i=1;i<=k;++i) {
        fin >> prime[i];
        primeidx[i] = 0;
    }
    humble[1] = prime[1];
    humble[0] = 1;
    for (l=2;l<=n;++l) {
        best = -1;
        best_idx = -1;
        for (j=1;j<=k;++j) {            
            while (prime[j] * humble[primeidx[j]] <= humble[l-1]) {
                  primeidx[j]++;
            }
            if (best == -1 || prime[j] * humble[primeidx[j]] < best) {
               best = prime[j] * humble[primeidx[j]];
               best_idx = j;
            }
        }
        primeidx[best_idx]++;
        humble[l] = best;
    }
    fout << humble[n] << "\n";
    return 0;
}
